Skip to content

feat(glass): plain-language Policy room - the ninth and final Basement room - #117

Merged
EmergentKnowledgeGroup merged 3 commits into
mainfrom
codex/glass-office-p5-policy
Jul 26, 2026
Merged

feat(glass): plain-language Policy room - the ninth and final Basement room#117
EmergentKnowledgeGroup merged 3 commits into
mainfrom
codex/glass-office-p5-policy

Conversation

@EmergentKnowledgeGroup

Copy link
Copy Markdown
Owner

Summary

The stable policy room completes the design-required Basement (P5). It explains and edits how ExecAss handles derived or unattended work, in owner language:

  • Exact owner directions are never policed. The page states this plainly and adds no prohibited-action catalog, users, tenants, roles, or second approval machinery.
  • Dangerous or destructive work gets exactly one consequence confirmation - stated, asked once, carried forward.
  • Policy governs derived/unattended work; quotas are presented as technical execution limits, explicitly never money or spending.

What's in the slice

  • policyActions.ts: byte-exact reproduction of the gateway's owner-proof digests - serde struct-order body digest and strict canonical (sorted NFC keys, integer-only, UTF-8 key order) safe-snapshot digest - with golden-string tests.
  • Additive requestId option on the one versioned ExecAss client so the policy PUT sends the binding's correlation id as x-request-id (the gateway rebuilds the expected binding from that header).
  • policyInvalidationGeneration on the one durable Office stream consumer; no second websocket, cursor loop, or event store.
  • useExecassPolicyController (App-owned, one instance): identity-bound transition-render invalidation, generation-safe late-read rejection, one synchronous apply lock, complete-ruleset PUT at the authoritative revision, success claimed only after the authoritative response, retained drafts on failure and 409 conflict with authoritative refetch. A dedicated race test locks that the update's own policy.changed stream echo is never mistaken for a stale identity (separate identity vs read generations + monotonic revision guard).
  • PolicyRoomPage: profile cards lead, advanced rule details expose bounded technical fields, one review step with the concrete consequence/diff, then one confirmation; honest loading/error/unconfigured-bootstrap states; the policy pin renders only on the ready room.
  • Registry room + hidden fourteenth policy Office shortcut. Policy shares the connectors route like Setup: independently reachable, rendered before every connector availability gate, excluded from the connectors-disabled redirect. The capacity fixture holds all thirteen earlier placements through Setup with one explicitly hidden, proves 24/24 cells, refuses byte-identically, then admits after freeing one visible shortcut.
  • Stateful mock-gateway policy fixture: GET/PUT with the same recomputed binding identity as production put_policy, exact request recording, 503/409 injection, and policy.changed through the existing stream harness. The mock resume handler now honestly answers compacted-history cursors with a refetch frame (previously a fresh cursor made every live event a permanent gap).
  • p5-policy-slice.spec.ts (@core): desktop + 390px proof of room identity and single lamp, owner-language truth, edit/review/confirm with exact recorded proof (correlation, idempotency, revision, complete ruleset), retained draft on injected 503, live ws refetch, 409 conflict recovery, config-only pin, refusal/admit, exact doors through disable/restore and reload, readable non-overlapped P mark, nonzero inner geometry, no horizontal overflow, and exact injected-failure accounting at request/response/console boundaries.

Validation (all local, at this head)

  • npm run typecheck PASS; npm run lint PASS
  • npm run test:unit -- --run 755/755 PASS (new: policyActions golden digests 8, api x-request-id, office policy generation, policy controller 11 hostile incl. echo race, PolicyRoomPage 12, ConnectorsPage policy seam 7, floors/pin registry + fourteenth capacity)
  • npm run build PASS (pre-existing chunk-size warning only)
  • p5-policy-slice e2e PASS; stream-sensitive anchors (execass-office, live-feed, reconnect-edge solo, p5-setup) PASS; all seven other P5 anchors PASS
  • Composed core suite 45/45 PASS in 6.0m
  • ExecAss contract validator PASS; carsinos-protocol 5/5 PASS (contracts untouched)
  • git diff --check PASS; changed-file scope audited; 14 QA screenshots captured under runtime/qa/p5-policy-slice/ and visually inspected

🤖 Generated with Claude Code

EmergentKnowledgeGroup and others added 2 commits July 26, 2026 04:00
The stable `policy` room completes the design-required Basement. It
presents owner-language autonomy truth - exact owner directions are never
policed, dangerous work gets exactly one consequence confirmation, and
policy governs derived/unattended work - with quotas labeled as technical
execution limits, never money.

- policyActions.ts reproduces the gateway's serde body digest and strict
  canonical safe-snapshot digest byte for byte for the owner-proof binding.
- The versioned client gains an additive requestId option so the policy
  PUT sends the bound correlation id as x-request-id.
- The one Office stream authority exposes policyInvalidationGeneration;
  no second websocket, cursor loop, or event store.
- useExecassPolicyController: identity-bound generation-safe reads, one
  synchronous apply lock, complete-ruleset PUT at the authoritative
  revision, success only after the authoritative response, retained
  drafts on failure and conflict, conflict refetch, and the update's own
  policy.changed echo is never mistaken for a stale identity.
- PolicyRoomPage: profile cards, advanced rules, one review step with the
  concrete consequence then one confirmation, honest loading/error/
  unconfigured states, and the policy pin only on the ready room.
- Policy shares the connectors route like Setup: always available,
  rendered before every connector gate, never redirected to Setup.
- Hidden fourteenth `policy` shortcut with a 24/24 capacity fixture
  (thirteen earlier placements, one explicitly hidden, byte-identical
  refusal, admit-after-free) and config-only pinning.
- Stateful mock policy GET/PUT enforces the production binding identity,
  records exact requests, injects 503/409, and emits policy.changed; the
  mock resume handler now honestly refetches compacted-history cursors so
  live events apply instead of gapping forever.
- Desktop + 390px Playwright proof with exact error accounting.

Validation: typecheck, lint, unit 755/755, build, p5-policy e2e, all P5
anchors, composed core 45/45, contract validator, git diff --check PASS.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 8 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ff68fdf2-e24a-4ff7-a9dc-010c6a23f237

📥 Commits

Reviewing files that changed from the base of the PR and between a49de31 and b11fa43.

📒 Files selected for processing (24)
  • apps/mission-control/e2e/mockGateway.mjs
  • apps/mission-control/e2e/p5-policy-slice.spec.ts
  • apps/mission-control/src/App.tsx
  • apps/mission-control/src/app/AppContent.tsx
  • apps/mission-control/src/app/useRuntimeConnectionController.test.tsx
  • apps/mission-control/src/app/useRuntimeConnectionController.ts
  • apps/mission-control/src/features/connectors/ConnectorsPage.test.tsx
  • apps/mission-control/src/features/connectors/ConnectorsPage.tsx
  • apps/mission-control/src/features/execassOffice/officeBlocks.ts
  • apps/mission-control/src/features/execassOffice/pinToOffice.test.ts
  • apps/mission-control/src/features/execassOffice/useExecassOfficeController.test.tsx
  • apps/mission-control/src/features/execassOffice/useExecassOfficeController.ts
  • apps/mission-control/src/features/execassPolicy/PolicyRoomPage.test.tsx
  • apps/mission-control/src/features/execassPolicy/PolicyRoomPage.tsx
  • apps/mission-control/src/features/execassPolicy/useExecassPolicyController.test.tsx
  • apps/mission-control/src/features/execassPolicy/useExecassPolicyController.ts
  • apps/mission-control/src/glass/execass/api.test.ts
  • apps/mission-control/src/glass/execass/api.ts
  • apps/mission-control/src/glass/execass/policyActions.test.ts
  • apps/mission-control/src/glass/execass/policyActions.ts
  • apps/mission-control/src/glass/floors.test.ts
  • apps/mission-control/src/glass/floors.ts
  • apps/mission-control/src/styles.css
  • docs/plans/2026-07-23-glass-office-claude-resume.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/glass-office-p5-policy

Comment @coderabbitai help to get the list of available commands.

@EmergentKnowledgeGroup

Copy link
Copy Markdown
Owner Author

Hostile QA correction is pushed once at b11fa43.

The correction closes two source-level blockers and hardens the proof:

  • stale full-ruleset conflicts can no longer be confirmed or resubmitted at the new revision; the owner must explicitly reconcile, which reapplies only owner-edited profile/parallelism/recovery fields onto the latest complete server rules and forces a fresh review;
  • successful secure-token replacement/clear advances the policy identity, so same-gateway reads and PUT responses from the old credential scope are discarded;
  • loading/error Policy states no longer expose the Office pin;
  • stateful E2E now proves one injected request/response for each 503/409, distinct request correlation, 64-hex binding digests, preservation of a concurrent untouched rule through reconciliation, and desktop/390 viewport/room/occlusion geometry.

Local proof on these exact bytes: typecheck; lint; unit 759/759; production build; core E2E 45/45 in 6.0m; generated-contract drift check; independent ExecAss contract validator; diff-check. Sixteen nonzero Policy artifacts were inventoried and the corrected critical desktop/mobile frames were visually inspected. Contracts remain untouched.

@EmergentKnowledgeGroup
EmergentKnowledgeGroup merged commit 2d99d98 into main Jul 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant